################################################################################
#
# nxp s32 s32g ipcf features
#
################################################################################
IPCF_VERSION = $(call qstrip,$(BR2_PACKAGE_IPCF_SW_VERSION))
IPCF_SOC_PLATFORM = $(call qstrip,$(BR2_PACKAGE_NXP_S32_SOC_PLATFORM))
IPCF_SITE = package/nxp/s32/ipcf/$(IPCF_SOC_PLATFORM)/ipc-shm-$(IPCF_VERSION)
IPCF_SITE_METHOD = local

IPCF_INSTALL_IMAGES = YES

IPCF_INSTALL_TARGET_DIR = $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/kernel/extra

SOC_PLATFORM = $(call qstrip,$(BR2_TARGET_PLATFORM_NXP_S32_S32G_SUB_PLAT))

IPCF_MAKE_OPTS += \
	PLATFORM_FLAVOR=$(SOC_PLATFORM) \
	KERNELDIR=$(LINUX_DIR) \
	CROSS_COMPILE=$(TARGET_CROSS)

ifeq ($(BR2_PACKAGE_S32_IPCF_SINGLE_INSTANCE),y)
IPCF_BUILD_DIR = $(@D)/sample
else ifeq ($(BR2_PACKAGE_S32_IPCF_MULTI_INSTANCE),y)
IPCF_BUILD_DIR = $(@D)/sample_multi_instance
endif

IPCF_MODULE_MAKE_OPTS += \
	PLATFORM_FLAVOR=$(SOC_PLATFORM) \
	KERNELDIR=$(LINUX_DIR) \
	CROSS_COMPILE=$(TARGET_CROSS)

$(eval $(kernel-module))
$(eval $(generic-package))
